package com.stream.service;

import com.stream.model.entity.TokenEntity;

import java.util.Map;

/**
 * Created by yebaokang on 2017/5/22.
 */
public interface TokenService {

    TokenEntity queryByUserId(Long userId);

    TokenEntity queryByToken(String token);

    void save(TokenEntity token);

    void update(TokenEntity token);

    /**
     * 生成 Token
     *
     * @param userId 用户ID
     * @return 返回token相关信息
     */

    Map<String, Object> createToken(Long userId);
}
